package com.pansoft.openplanet.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.efounder.chat.activity.BaseActivity;
import com.pansoft.openplanet.R;

/**
 * @author wang
 * 冷热钱包描述
 */
public class WalletTypeIntroActivity extends BaseActivity {


    public static final int WALLET_TYPE_COLD = 0;
    public static final int WALLET_TYPE_HOT = 1;
    private int type;
    private TextView tvTitle, tvIntroDetail;
    private ImageView ivWallet;

    public static void start(Context context, int type) {
        Intent starter = new Intent(context, WalletTypeIntroActivity.class);
        starter.putExtra("type", type);
        context.startActivity(starter);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.assets_activity_wallet_type_intro);
        initView();
        initData();
    }

    private void initView() {
        tvTitle = (TextView) findViewById(R.id.tv_title);
        tvIntroDetail = (TextView) findViewById(R.id.tv_intro_detail);
        ivWallet = (ImageView) findViewById(R.id.iv_wallet);
//        findViewById(R.id.btn_ok).setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                finish();
//            }
//        });
    }

    private void initData() {
        type = getIntent().getIntExtra("type", 0);
        if (type == WALLET_TYPE_COLD) {
            tvTitle.setText(R.string.op_what_is_cold_wallet);
            tvIntroDetail.setText(R.string.op_cold_wallet_detail);
            ivWallet.setImageDrawable(getResources().getDrawable(R.drawable.wallet_icon_type_cold));
        } else {
            tvTitle.setText(R.string.op_what_is_hot_wallet);
            tvIntroDetail.setText(R.string.op_hot_wallet_detail);
            ivWallet.setImageDrawable(getResources().getDrawable(R.drawable.wallet_icon_type_hot));
        }

    }
}
